import { createApp } from 'vue'
import App from './App.vue'
import router, { setupRouter } from '@/router'
import { setupStore } from '@/store'
import { setupElementPlus } from '@/plugins'
import 'normalize.css/normalize.css'

const app = createApp(App)

// 注册全局elementPlugins
setupElementPlus(app)
// 注册路由
setupRouter(app)
// 注册vuex
setupStore(app)

// 路由准备就绪后挂载APP实例
router.isReady().then(() => app.mount('#app'))

export default app
